package Thread;

import com.company.Tree.Tree;

import java.util.concurrent.atomic.AtomicReference;

/**
 * @author VX5
 * @Title: MJC
 * @ProjectName DataStructure
 * @Description: TODO
 * @date ${DAT}21:36
 */
public class AtomicReferenceDemo {
    public static void main(String[] args) {
        User user = new User();
        user.setId("sdasd");
        user.setName("tom");
        AtomicReference<User> atomicReference = new AtomicReference();
//        atomicReference.compareAndSet(user,)
    }


    static class User{
        String name;
        String id;

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public String getId() {
            return id;
        }

        public void setId(String id) {
            this.id = id;
        }
    }
}
